package com.malie.myspringboot.hutool;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.extra.mail.MailAccount;
import cn.hutool.extra.mail.MailUtil;
import org.junit.Test;

public class mailDemo {
    @Test
    public void sendMail() {
        MailAccount account = new MailAccount();
        account.setHost("smtp.163.com");
        account.setPort(25);
        account.setAuth(true);
        account.setFrom("13545385423@163.com");
        account.setUser("13545385423@163.com");
        // AKJVYSFAPWBMFZSQ
        account.setPass("AKJVYSFAPWBMFZSQ");
        MailUtil.send(account, CollUtil.newArrayList("huangml5@lenovo.com"), "Nihao", "Nihao", false);
    }
}
